package com.flyee.controller
{
	import com.flyee.utils.Obsevable;
	import com.flyee.viewer.SkillButtonViewer;
	
	public class SkillCDController extends Obsevable
	{
		/**
		 * SkillButton数组
		 */
		private var rotations:Array = new Array();
		
		/**
		 * 统一的延迟时间
		 */
		public var duration:int;
		public function SkillCDController()
		{
		}
		
		/**
		 * 播动画
		 */
		public function radiate():void{
			for each(var view:SkillButtonViewer in rotations){
				if(duration)
				view.duration = duration;
				view.addEvent();
			}
		}
		
		public function push(viewer:SkillButtonViewer):void{
			viewer.skillCDController = this;
			this.rotations.push(viewer);
		}

	}
}